home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / DHTML - Date and Time / live-date-title.izs < prev    next >
Text File  |  2005-08-31  |  3KB  |  76 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Title date Script
  4. <!/TITLE>
  5.  
  6. <!BROWSER>FF1+ IE5+ Opr7+<!/BROWSER>
  7.  
  8. <!DESCRIPTION>This is a simple yet useful DHTML script that displays the current date as the title of the document. It utilizes the exclusive document.title property of IE 4/NS6 to accomplish this, therefore, is only visible to IE 4/NS6 browsers. Randall Smith wrote the script, while we took it and enhanced it for cross browser friendliness. 
  9. <!/DESCRIPTION> 
  10.  
  11. <!CATEGORY>date and time<!/CATEGORY>
  12.  
  13. <!SCRIPT>
  14. <!-- START OF SCRIPT -->
  15. <script language="JavaScript1.2">
  16. <!--hide
  17.  
  18. //date in title by Randall Smith copyright 1999
  19. //Permission given to Dynamicdrive.com to feature it in it's DHTML archive
  20. //Script modified by Dynamicdrive.com to make it cross browser friendly. Visit Dynamicdrive.com for more DHTML scripts
  21. //please visit me on the web at http://members.xoom.com/u4rstunzd/
  22. //and to change the title:where it says Welcome todays date is: just put you own text in if you would like to--
  23. var isnMonth = new
  24. Array("January","February","March","April","May","June","July","August","Septerber","October","November","December");
  25. var isnDay = new
  26. Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
  27. today = new Date () ;
  28. Year=today.getYear();
  29. if (Year < 1000)
  30. Year+=1900
  31. Date=today.getDate();
  32. function setdate(){
  33. document.title="Welcome. today\'s date is: "+isnDay[today.getDay()]+", "+isnMonth[today.getMonth()]+" "+Date+", "+Year+""
  34. }
  35. if (document.all)
  36. setdate()
  37. else if (document.getElementById)
  38. window.onload=setdate
  39. //--hide-->
  40. </script>
  41. <!-- END OF SCRIPT -->
  42. <!/SCRIPT>
  43.  
  44. <!PREVIEW>
  45. <!-- START OF SCRIPT -->
  46.  
  47. <script language="JavaScript1.2">
  48. <!--hide
  49.  
  50. //date in title by Randall Smith copyright 1999
  51. //Permission given to Dynamicdrive.com to feature it in it's DHTML archive
  52. //Script modified by Dynamicdrive.com to make it cross browser friendly. Visit Dynamicdrive.com for more DHTML scripts
  53. //please visit me on the web at http://members.xoom.com/u4rstunzd/
  54. //and to change the title:where it says Welcome todays date is: just put you own text in if you would like to--
  55. var isnMonth = new
  56. Array("January","February","March","April","May","June","July","August","Septerber","October","November","December");
  57. var isnDay = new
  58. Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
  59. today = new Date () ;
  60. Year=today.getYear();
  61. if (Year < 1000)
  62. Year+=1900
  63. Date=today.getDate();
  64. function setdate(){
  65. document.title="Welcome. today\'s date is: "+isnDay[today.getDay()]+", "+isnMonth[today.getMonth()]+" "+Date+", "+Year+""
  66. }
  67. if (document.all)
  68. setdate()
  69. else if (document.getElementById)
  70. window.onload=setdate
  71. //--hide-->
  72. </script>
  73. <!-- END OF SCRIPT -->
  74. <!/PREVIEW>
  75.  
  76. <!RELATED>NONE<!/RELATED>